getConnect(url, callback){
  // 判断浏览器是否支持WebSocket
  let is_support = ("WebSocket" in window);
  if (is_support) {
    // 打开一个 web socket
    let ws = new WebSocket(url);
    ws.onopen = function () {
      ws.send(that.ticket);
    };
    //  Web Socket 已连接上
    //  接受服务器数据
    ws.onmessage = function (msg) {
      //收到消息之后的操作
      (callback && typeof (callback) === "function") && callback(msg)
      //关闭webSocket连接
      ws.close();
    };
    //监听窗口关闭事件，当窗口关闭时，主动去关闭websocket连接，防止连接还没断开就关闭窗口，server端会抛异常。
    window.onbeforeunload = function () {
      ws.close();
    };
  } else {
    this.$alert("浏览器版本过低，请更新浏览器", "警告", {
      confirmButtonText: '确定',
      type: "error",
      callback: () => {
        location.reload()
      }
    })
  }
}